<!--
    Author : Alvin Andhika - 13507037
-->

<head>
	<title>Jadwal Pribadi</title>
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/jquery-ui-1.8.11.custom/css/blitzer/jquery-ui-1.8.12.custom.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/jquery-timepicker/timePicker.css" />
        <script type="text/javascript" src="<?php echo base_url(); ?>assets/jquery-ui-1.8.11.custom/js/jquery-1.5.1.min.js"></script>
        <script type="text/javascript" src="<?php echo base_url(); ?>assets/jquery-ui-1.8.11.custom/js/jquery-ui-1.8.11.custom.min.js"></script>
        <script type="text/javascript" src="<?php echo base_url(); ?>assets/jquery-timepicker/jquery.timePicker.min.js"></script>
        <script type="text/javascript" src="<?php echo base_url(); ?>assets/jquery-timepicker/jquery.timePicker.js"></script>

        <script type="text/javascript">

            $(function() { //on document ready                
                if($("#errormsg").val() != ''){
                    alert($("#errormsg").val());
                }
                $( "#tanggalMulai" ).datepicker({dateFormat: 'dd-mm-yy'});
                $( "#tanggalSelesai" ).datepicker({dateFormat: 'dd-mm-yy'});
                $( "#jamSelesai" ).timePicker();
                $( "#jamMulai" ).timePicker();
            });

	</script>

</head>

<input type="hidden" name="errormsg" id="errormsg" value='<?php echo $message; ?>' />
<?php if($page == "form") { ?>
<form method="post" action="<?php echo site_url('ServerMelihatJadwalPribadi/getJadwalKegiatan')?>">

<fieldset id="formJadwal">
    <legend>&nbsp; <b>Form Jadwal Kegiatan</b></legend>
    <input type="hidden"  name="userID" value='<?php echo $userID; ?>'/>
    <table>
        <tr>
            <td>
                <label for="tanggalMulai">Tanggal Mulai<br />(DD-MM-YYYY)</label>
            </td>
            <td>
                <input type="text" id="tanggalMulai" name="tanggalMulai" size="10" maxlength="10" value="<?php echo set_value('tanggalMulai'); ?>"/>
            </td>
        </tr>

        <tr>
            <td>
                <label for="tanggalSelesai">Tanggal Selesai<br />(DD-MM-YYYY)</label>
            </td>
            <td>
                <input type="text" id="tanggalSelesai" name="tanggalSelesai" size="10" maxlength="10" value="<?php echo set_value('tanggalSelesai'); ?>"/>
            </td>
        </tr>
        
        <tr>
            <td>
                <label for="jamMulai">Jam Mulai<br />(HH:MM)</label>
            </td>
            <td>
                <input type="text" id="jamMulai" name="jamMulai" size="5" maxlength="5" value="<?php echo set_value('jamMulai'); ?>"/>
            </td>
        </tr>

        <tr>
            <td>
                <label for="jamSelesai">Jam Selesai<br />(HH:MM)</label>
            </td>
            <td>
                <input type="text" id="jamSelesai" name="jamSelesai" size="5" maxlength="5" value="<?php echo set_value('jamSelesai'); ?>"/>
            </td>
        </tr>
        <!--
        <tr>
            <td valign="top">
                <label><h3>Kegiatan Rutin</h3></label>
            </td>
        </tr>
        -->
        <tr>
            <td>
                <label for="hari">Hari</label>
            </td>
            <td>
                <select name="hari" id ="hari">
                    <option value="Senin" selected="selected">Senin</option>
                    <option value="Selasa">Selasa</option>
                    <option value="Rabu">Rabu</option>
                    <option value="Kamis">Kamis</option>
                    <option value="Jumat">Jumat</option>
                    <option value="Sabtu">Sabtu</option>
                    <option value="Minggu">Minggu</option>
                </select>
            </td>
        </tr>

    </table>
    <input type="submit" value="Tampilkan Jadwal" class="f-submit" />
    <br/>
    <br/>
</fieldset>
</form>

<?php } else if($page == "jadwal") { ?>
    <h4><b>Jadwal Kegiatan</b></h4>
    <?php echo $tabelKegiatanRutin; ?>

<!--
<br/>
    <h4><b>Jadwal Kegiatan Non Rutin</b></h4>
    <?php //echo $tabelKegiatanNonRutin; ?>
-->
<?php } ?>
